d<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      function fn() {
        var start = new Date();
        //定义一个空的数组
        var arr = [];
        for (var i = 0; i < 100; i++) {
          //然后给空数组添加 div和样式
          arr.push('<div style="width:100px;height:2px;border:1px solid blue"></div>');
        }
        // 然后获取body   给arr数组 转换为字符串
        document.body.innerHTML = arr.join('');
        var end = new Date();
        console.log(end - start);
      }
      fn();
    </script>
  </body>
</html>
